package com.shanzmoo.core.service;

import com.shanzmoo.base.bean.SResponse;
import com.shanzmoo.core.domain.pay.PayOrderByWxJsapReq;
import com.shanzmoo.core.domain.pay.PayOrderByWxMwebReq;
import com.shanzmoo.core.domain.pay.PayOrderQrCodeReq;
import com.shanzmoo.core.domain.pay.PayOrderTradeReq;
import com.shanzmoo.core.domain.pay.PayResultResp;
import com.shanzmoo.core.domain.pay.WxWapPayResp;

import java.util.Map;

public interface ITradeService {

    SResponse<String> genQrCode(PayOrderQrCodeReq request);

    SResponse<Boolean> tradeByQrCode(PayOrderTradeReq request);

    /**
     * 查询支付结果
     * @param payNo 支付单号
     * @return
     */
    SResponse<PayResultResp> queryPayResult(String payNo);

    /**
     * 微信JSAP支付（公众号h5）
     * @param request
     * @return
     */
    SResponse<WxWapPayResp> wxPayByJsap(PayOrderByWxJsapReq request);

    /**
     * 微信网页支付（非微信浏览器）
     * @param request
     * @return
     */
    SResponse<String> wxPayByMweb(PayOrderByWxMwebReq request);

    /**
     * 微信回调处理
     *
     * @author Gzhao 2021/1/16
     * @param
     * @return
     */
    String doWxNotify(String notifyData) throws Exception;

    void doAliPayCallback(Map<String, String> map);
}
